print "how old are you? ";
$a = <STDIN>;
chomp($a);
if ($a < 18) {
print "So, you're not old enough to vote, eh?\n";
} else {
print "Old enough! Cool! So go vote!\n";
$voter++; # count the voters for later
}